package com.ncd.form.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.ncd.form.result.RecordItmResult;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 表单字典
 *
 * @author tree_new_bee
 */
@Data
@TableName(value = "form_dict")
public class  FormDict{

    @TableId(value = "dict_id",type = IdType.AUTO)
    private Long dictId;

    /**字典代码*/
    @NotBlank(message = "字典代码不能为空")
    private String dictCode;

    /**标题*/
    private String dictTitle;

    /**提示*/
    private String dictTip;

    /**类型*/
    @NotBlank(message = "字典类型不能为空")
    private String dictType;

    /**父字典*/
    private Long dictParent;

    /**排序*/
    private Integer dictSeq;

    @TableField("dict_dataset")
    private String dictDataSet;

    /**自动计算得分*/
    private String dictAutoScore;

    /**得分，子元素*/
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal dictScore;

    /**标准得分,父元素*/
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal dictStandardScore;

    /**是否可以复制*/
    private String dictCopy;

    /**宽度*/
    private String dictWidth;

    /**高度*/
    private String dictHeight;

    /**扩展*/
    private String dictExpand;

    /**table的rows*/
    private Integer dictRowspan;

    /**table的cols*/
    private Integer dictColspan;

    /**附件路径*/
    private String dictPath;

    /** 换行 */
    private String dictWrap;

    /** 默认值 */
    private String dictDefaultValue;

    /** 必填 */
    private String dictRequired;

    /** 备注 */
    private String remark;

    /** 关联数据集id */
    private Long dictLinkId;

    /**
     * 子元素
     */
    @TableField(exist = false)
    private List<FormDict> dicts=new ArrayList<>();

    /**
     *行号
     */
    @TableField(exist = false)
    private String rowKey;

    /**
     * 结果
     */
    @TableField(exist = false)
    private RecordItmResult recordItmResult;

    /**
     * 结果
     */
    @TableField(exist = false)
    private RecordItm recordItm;

    /**
     * uniapp checkbox显示title
     */
    @TableField(exist = false)
    private String displayTitle;

}
